Update source when getting its root_package
authorCarol (Nichols || Goulding) <carol.nichols@gmail.com>
Sat, 19 Sep 2015 17:06:23 +0000 (13:06 -0400)
committerCarol (Nichols || Goulding) <carol.nichols@gmail.com>
Sun, 20 Sep 2015 03:19:16 +0000 (23:19 -0400)
commit339146def15b9d771d8ba3fdd7bdbaabca9b03fb
tree40bf7e4afbad9f7f4d1fbd640393bfc1286e3ec7
parentde11b583d83985c85b11f2c77d236548faa004f2
Update source when getting its root_package

This way, callers who want source.root_package() don't have to remember
to call source.update() before that. Since source.update() is a noop if
the source has already been updated, there's not a reason I could see to
raise an error instead of just calling it.

The one remaining place that calls source.root_package() that is still
calling source.update() immediately before is in bin/read_manifest,
where the errors from update() are mapped to CliErrors.
src/cargo/ops/cargo_clean.rs
src/cargo/ops/cargo_compile.rs
src/cargo/ops/cargo_doc.rs
src/cargo/ops/cargo_fetch.rs
src/cargo/ops/cargo_generate_lockfile.rs
src/cargo/ops/cargo_package.rs
src/cargo/ops/cargo_pkgid.rs
src/cargo/ops/cargo_run.rs
src/cargo/ops/registry.rs
src/cargo/sources/path.rs